<%@page import="hyl.ext.base.SessionFactory"%>
<%@page import="hyl.ext.base.MySession"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<%@ page import="com.servlet.My,com.servlet.*"%>
<% 
/* 系统全局变量定义区
*/
 String SYSTEMNAME="后台管理系统";
 String path = request.getContextPath();
 String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
   + path + "/";
 
 MySession tk =null;
 Integer mysession_role=null;
 try{
  tk = SessionFactory.getInstance().getSession(request,response);
  
  if (tk==null || tk.getUserId()==null) {
 	// response.getWriter().write(tk);
  //  System.out.print(tk);
  //Response.forward(request, response, M.URL_login);
     response.sendRedirect(request.getContextPath()+ M.URL_login);
     return;
 }else{
 	mysession_role= tk.getRoleid();

 }
 }catch(Exception e){
 	response.sendRedirect(request.getContextPath()+ M.URL_login);   
 }// 过滤非法ip

 

%>

